/**
 * 封装与商家相关请求接口地址
 */
import instance from "@/utils/http.js";
import qs from "qs";

/**
 * 查询某个店铺下的所有菜品分类数据
 */
export const findAllFoodCategoryAPI = (data) => {
    return instance.get("/findAllFoodCategory", { params: data });
};
/**
* 查询菜品分类列表
*/
export const foodCategoryListAPI = (data) => {
    return instance.get("/findFoodCategory", { params: data });
};
/**
 * 菜品分类添加
 */
export const foodCategoryAddAPI = (data) => { 
    return instance.post("/foodCategoryAdd", qs.stringify(data));
};
/**
 * 删除菜品分类
 */
export const foodCategoryDeleteAPI = (data) => { 
    return instance.get("/foodCategoryDelete", { params: data });
  }
  /**
 * 菜品分类的修改
 */
export const foodCategoryUpdateAPI = (data) => {
    return instance.post("/foodCategoryUpdate", qs.stringify(data));
  };
  ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////

//食物的方法路径定义
/**
 * 添加菜品
 */
export const addFoodAPI = (data) => {
    return instance.post("/food", qs.stringify(data));
  };
  /**
   * 修改菜品
   */
  export const updateFoodAPI = (data) => {
    return instance.post("/food", qs.stringify(data));
  };
  
  /**
   * 删除菜品数据
   */
  export const deleteFoodAPI = (data) => {
    return instance.get("/food", { params: data });
  };
  
  /**
   * 查询当前店铺下的所有菜品数据
   */
  export const findFoodListAPI = (data) => {
    return instance.get("/food", { params: data });
  };